import { ref } from 'vue';

const useWelfareReconciliation = () => {
    const { proxy } = getCurrentInstance() as ComponentInternalInstance;

    const applyVisible = ref(false);
    const applyObj = ref<any>();

    /**
     * @description: 打开对账弹窗
     */
    const handleOpenApply = (row: any) => {
        const { inStatus } = row;
        if (inStatus !== '2') return proxy?.$modal.msgError('福利采购单未入库，无法对账!');
        applyObj.value = row;
        applyVisible.value = true;
    };



    return {
        applyVisible,
        applyObj,
        handleOpenApply
    }
};

export default useWelfareReconciliation;